<?php
/** @var MailAsuntoController $this */
    /** @var MailAsunto $model */
    /** @var AweActiveForm $form */
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'type' => 'horizontal',
    'id' => 'mail-asunto-form',
    'enableAjaxValidation' => false,
    'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,),
    'enableClientValidation' => true,
        ));
?>
<div class="span8">
    <div class="widget blue">
        <div class="widget-title">
            <h4><i class="icon-envelope"></i> <?php echo Yii::t('AweCrud.app', 'Create') ?><?php echo ' '.MailAsunto::label(1) ?> </h4>
        </div>
        <div class="widget-body">
            <?php echo $form->textFieldRow($model, 'nombre', array('maxlength' => 45)) ?>
            <?php echo $form->textAreaRow($model, 'descripcion', array('rows' => 3, 'cols' => 50)) ?>
            <div class="form-actions">
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    'buttonType' => 'submit',
                    'type' => 'success',
                    'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
                ));
                ?>
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    //'buttonType'=>'submit',
                    'label' => Yii::t('AweCrud.app', 'Cancel'),
                    'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
                ));
                ?>
            </div>
        </div>
    </div>
</div>

<div class="span4">
    <div class="widget orange">
        <div class="widget-title">
            <h4><i class="icon-tags"></i><?php echo Yii::t('app', 'MailPlantillas'); ?></h4>
        </div>
        <div class="widget-body">
            <div class="page-body">
                <div class="form-check-list" style="height:300px;overflow:auto;">
                    <?php
                    echo CHtml::checkBoxList('MailAsunto[mailPlantillas]', array_map('AweHtml::getPrimaryKey', $model->mailPlantillas), CHtml::listData(MailPlantilla::model()->activos()->findAll(), 'id', 'nombre'), array('attributeitem' => 'id', 'checkAll' => 'Seleccionar todas'))
                    ?>
                </div>

            </div>
        </div>
    </div>
</div>

<?php $this->endWidget(); ?>